package biz

import (
	"github.com/go-kratos/kratos/v2/log"
	"github.com/go-resty/resty/v2"
	"kratosRecoverPanic/internal/conf"
)

// Notice 项目中可以拆分多个业务层，每个业务层有公共的资源，可以把它们封装到 BaseBiz 中,不用在每个biz层都初始化一次了
// Notice BaseBiz 也可以有自己独立的repo，但是要注意 BaseBiz 中的repo方法一定要是 通用的！
type BaseBiz struct {
	log      *log.Helper
	httpCli  *resty.Client
	yamlConf *conf.Bootstrap
}

func NewBaseBiz(logger log.Logger, httpCli *resty.Client, yamlConf *conf.Bootstrap) *BaseBiz {
	return &BaseBiz{
		log:      log.NewHelper(logger),
		httpCli:  httpCli,
		yamlConf: yamlConf,
	}
}
